package com.jensen.controller;

import com.jensen.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Jensen on 2016/9/29.
 */
@RestController
public class WebController {

    @Autowired
    private UserService userService;

    @RequestMapping("/test1")
    public Object test1() {

        try {
            return this.userService.test1();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "success";
    }

    @RequestMapping("/test2")
    public Object test2(){
        this.userService.test2();
        return "success";
    }

    @RequestMapping("/test3")
    public Object test3(){
        this.userService.test3();
        return "success";
    }

    @RequestMapping("/test4")
    public Object test4(){
        this.userService.test4();
        return "success";
    }

}
